.chat {
  // pass
}
.init-chat-wrapper {
  width: 100%;

  position: relative;
  margin-top: 0.4rem;
  // // border-radius: 4px 16px 16px 16px;
  // box-shadow: 0px 1px 6px 0px rgba(0, 129, 255, 0.3);
  // background: linear-gradient(
  //   180deg,
  //   rgba(197, 220, 254, 0.3) 0%,
  //   #ffffff 30% #ffffff 100%
  // );
  // padding: 22px 28px 32px 28px;
  .head {
    display: flex;
    flex-direction: row;
    align-items: center;
    .left {
      .icon {
        display: flex;
        // padding: 12px 10px 8px 10px;
        // padding: 10px 7px 6px 8px;
        // border-radius: 50%;
        border-radius: 4px;
        // background: linear-gradient(138deg, #2a3ee4, #2dd2af);
      }
    }
    .title {
      color: #fff;
      font-weight: 500;
      font-size: 1rem;
      margin-left: 1rem;
      flex: 1;
    }
    .right {
      .icon {
        position: absolute;
        right: 8px;
        top: 8px;
      }
    }
  }

  .desc-wrapper{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    :global{
      .ques-title-opera{
        margin-top: 12px;
        display: flex;
        align-items: center;
        cursor: pointer;
        justify-content: flex-end;
        color: #808AA1;
        font-size: 0.6rem;
        svg {
          width: 0.7rem;
          height: 0.7rem;
        }
        path {
          fill: #808AA1;
        }
  
        span {
            padding-left: 4px;
        }
  
        &-hovered {
          color: #fff;
          path {
            fill: #fff;
          }
      }
      }
    }
  }
  .desc {
    margin-top: 12px;
    color: #83868c;
    font-size: 0.6rem;
    font-weight: 400;
  }
  .opts {
    margin-top: 20px;
  }
}
.message-wrapper {
  font-size: 0.8rem;
  display: flex;
  flex-direction: row;
  // margin: 0.5rem 0rem 0.5rem 1rem;
  margin: 0.5rem 0;
  img {
    border-style: none;
    max-width: 100%;
    box-sizing: content-box;
    background-color: #ffffff;
  }
}
.place {
  flex: 1;
}
.message-resp{
  display: flex;
  flex-direction: row;
  width: 100%;
  .message-avatar{
    margin-right: 0.4rem;
    width: 1.6rem;
    height: 1.6rem;
  }
}
.message-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  word-break: break-all;
  width: 0;
  // max-width: calc(100vw - 3rem);
  // max-width: calc(100% - 2rem);
  img{
    margin-right: 0.2rem;
  }
}

.message {
  font-size: 0.7rem;
  flex: 1;
  --radius: 0.5rem;
  // margin: 0rem 1rem 0rem 0.5rem;
  // margin-left: 0.5rem;
  position: relative;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  grid-column: span 6 / -1;
  // padding: 1rem 1.5rem;
  // animation: fade-in 0.3s ease-out forwards;
  background-color: rgba(23, 33, 61, 0.8);
  padding: 0.5rem 1.5rem;
}
.message-overflow {
  overflow: auto;
}
.message_ai {
  // border-top-left-radius: 0;
}
.message_user {
  --radius: 0.5rem;
  font-size: 0.8rem;
  word-break: break-all;
  background: transparent;
  padding: 0;
  // font-weight: bold;
  // margin-right: 0.5rem;
  // margin-left: 0.5rem;
  position: relative;
  border-radius: var(--radius) 0 var(--radius) var(--radius);
  grid-column: span 6/-1;
  background: #0156C0;
  padding: 0.4rem;
  color: #fff;
  margin-left: 2rem;
}

.icon-gpt {
  width: 2rem;
  height: 2rem;

  align-items: center;
  background: linear-gradient(138deg, #2a3ee4, #2dd2af);
  border-radius: 0.4rem;
  color: #fff;
  display: flex;
  justify-content: center;
}

.icon-gpt-text {
  font-size: 0.4rem;
}
// ! 左侧样式: 丢弃
// .message_user {
//   background: linear-gradient(83.21deg, #3245ff 0%, #bc52ee 100%);
//   border-bottom-right-radius: 0;
//   color: #fff;
// }
// .message_user:after {
//   content: "";
//   background: #bc52ee;
//   right: calc(var(--size) * -1);
//   border-bottom-right-radius: 8rem;
//   background: radial-gradient(
//     circle at top right,
//     rgba(0, 0, 0, 0) 0,
//     rgba(0, 0, 0, 0) var(--size),
//     #bc52ee var(--size)
//   );
//   --size: 1rem;
//   content: "";
//   position: absolute;
//   bottom: 0;
//   height: var(--size);
//   width: var(--size);
//   z-index: 2;
// }

.message_input {
  animation: 0.6s van-cursor-flicker infinite;
}

.message_copy {
  position: absolute;
  display: flex;
  right: 10px;
  color: #1677ff;
  cursor: pointer;
}

.answer-actions {
  --radius: 0.5rem;
  // margin: 0.5rem 1rem 0.5rem 0.5rem;
  margin-top: 0.5rem;
  position: relative;
  border-radius: var(--radius);
  grid-column: span 6 / -1;
  animation: fade-in 0.3s ease-out forwards;
  background-color: rgba(23, 33, 61, 0.8);
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  .answer-actions-item {
    display: flex;
    flex-direction: row;
    &:not(:last-child) {
      margin-bottom: 10px;
    }
    .answer-actions-item-c {
      flex: 1;
      overflow: hidden;
      padding-left: 8px;
    }
  }
}

.recommend-ques-wrapper {
  ol {
    list-style: none; /* 去掉默认的列表样式 */
    padding-left: 0; /* 去掉整个列表的左边距 */
    // & > li {
    //   // padding-top: 1rem;
    //   line-height: 1.5;
    // }
  }
  ol {
    counter-reset: list-counter; /* 重置计数器 */
  }

  ol > li {
    counter-increment: list-counter; /* 增加计数器 */
    & > p {
      // display: inline;
    }
  }
  ol > li::before {
    content: counter(list-counter) ". "; /* 在每个 li 前显示计数 */
    position: absolute;
    left: 0.6rem;
    // color: red; /* 可以改变编号的颜色 */
    // font-weight: bold; /* 可以修改编号的样式 */
  }
}
// ! 生成回答时候默认插入显示的动效
.chat-answer-load {
  position: relative;
  display: inline-block;

  &::after {
    content: "|";
    animation: blink-animation 1s steps(2, start) infinite;
    position: absolute;
    top: 0;
    right: -1px;
  }

  @keyframes blink-animation {
    to {
      visibility: hidden;
    }
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes van-cursor-flicker {
  from {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}
